﻿using System.ComponentModel.DataAnnotations;

namespace JTTD.Domain.Dtos.CompanyUserInfo.Request
{
    /// <summary>
    /// 店家入驻
    /// </summary>
    public class InsertCompanyUserInfoRequestDto
    {
        /// <summary>
        /// 店家名称
        /// </summary>
        [Required(ErrorMessage ="店家名称不能为空")]
        [MaxLength(50,ErrorMessage ="店家名称不能超过25个汉字")]
        public string UserName { get; set; }

        /// <summary>
        /// 登录密码
        /// </summary>
        [Required(ErrorMessage = "登录密码不能为空")]
        [MaxLength(10, ErrorMessage = "登录密码不能超过10个字符")]
        public string Password { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空")]
        [DataType(DataType.PhoneNumber,ErrorMessage ="手机号格式错误")]
        [MaxLength(20,ErrorMessage ="手机号长度不能超过20个字符")]
        public string Phone { get; set; }

        /// <summary>
        /// 微信openId
        /// </summary>
        public string OpenId { get; set; }

        /// <summary>
        /// 店家logo图片
        /// </summary>
        [Required(ErrorMessage ="请上传logo图片")]
        [MaxLength(200,ErrorMessage ="店家logo图片链接不能超过200个字符")]
        public string HeadUrl { get; set; }

        /// <summary>
        /// 所在楼层
        /// </summary>
        [Range(1,4,ErrorMessage ="店家所在楼层选择错误")]
        public int Floor { get; set; }
        /// <summary>
        /// 楼层地址
        /// </summary>
        [MaxLength(20,ErrorMessage ="楼层地址不能超过20个字符")]
        [Required(ErrorMessage = "楼层地址不能为空")]
        public string Address { get; set; }

        /// <summary>
        /// 店铺类型
        /// </summary>
        [Required(ErrorMessage = "店铺类型不能为空")]
        public string ShopType { get; set; }

        /// <summary>
        /// 商户简介
        /// </summary>
        public string ShopDetail { get; set; }
    }
}
